package com.sa.gateway.entry;

/**
 * @author Architecture Station
 * @version 1.0
 */

import lombok.Data;

import java.util.Map;


@Data
public class LogEntry {
    private String timestamp;
    private String method;
    private String uri;
    private int status;
    private long duration;
    private String clientIp;
    private int clientPort;
    private Map<String, String> requestParams;

    @Override
    public String toString() {
        return new StringBuilder()
                .append("LogEntry {")
                .append("timestamp='").append(timestamp).append('\'')
                .append(", method='").append(method).append('\'')
                .append(", uri='").append(uri).append('\'')
                .append(", status=").append(status)
                .append(", duration=").append(duration).append(" ms")
                .append(", clientIp='").append(clientIp).append('\'')
                .append(", clientPort=").append(clientPort)
                .append(", requestParams=").append(requestParams)
                .append('}')
                .toString();
    }
}
